package com.indexingsystem.boss.entity;

import java.io.Serializable;
import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;

public class Resources implements Serializable {
	/**
	 * 
	 */
	private static final long	serialVersionUID	= 5123016173623860074L;

	private String				resId;

	private String				resName;

	private String				resTypeId;

	private String				publishDate;

	private String				thumbnail;

	private String				price;

	private Integer				favoriteCount;

	private Integer				shareCount;

	private Integer				useCount;

	private String				keyword;

	private Integer				status;

	private String				createUserId;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date				createDate;

	private String				lastUpdatedUserId;

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date				lastUpdatedDate;

	public String getResId() {
		return resId;
	}

	public void setResId(String resId) {
		this.resId = resId == null ? null : resId.trim();
	}

	public String getResName() {
		return resName;
	}

	public void setResName(String resName) {
		this.resName = resName == null ? null : resName.trim();
	}

	public String getResTypeId() {
		return resTypeId;
	}

	public void setResTypeId(String resTypeId) {
		this.resTypeId = resTypeId == null ? null : resTypeId.trim();
	}

	public String getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(String publishDate) {
		this.publishDate = publishDate;
	}

	public String getThumbnail() {
		return thumbnail;
	}

	public void setThumbnail(String thumbnail) {
		this.thumbnail = thumbnail == null ? null : thumbnail.trim();
	}

	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public Integer getFavoriteCount() {
		return favoriteCount;
	}

	public void setFavoriteCount(Integer favoriteCount) {
		this.favoriteCount = favoriteCount;
	}

	public Integer getShareCount() {
		return shareCount;
	}

	public void setShareCount(Integer shareCount) {
		this.shareCount = shareCount;
	}

	public Integer getUseCount() {
		return useCount;
	}

	public void setUseCount(Integer useCount) {
		this.useCount = useCount;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(String createUserId) {
		this.createUserId = createUserId == null ? null : createUserId.trim();
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getLastUpdatedUserId() {
		return lastUpdatedUserId;
	}

	public void setLastUpdatedUserId(String lastUpdatedUserId) {
		this.lastUpdatedUserId = lastUpdatedUserId == null ? null : lastUpdatedUserId.trim();
	}

	public Date getLastUpdatedDate() {
		return lastUpdatedDate;
	}

	public void setLastUpdatedDate(Date lastUpdatedDate) {
		this.lastUpdatedDate = lastUpdatedDate;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword == null ? null : keyword.trim();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((createDate == null) ? 0 : createDate.hashCode());
		result = prime * result + ((createUserId == null) ? 0 : createUserId.hashCode());
		result = prime * result + ((favoriteCount == null) ? 0 : favoriteCount.hashCode());
		result = prime * result + ((keyword == null) ? 0 : keyword.hashCode());
		result = prime * result + ((lastUpdatedDate == null) ? 0 : lastUpdatedDate.hashCode());
		result = prime * result + ((lastUpdatedUserId == null) ? 0 : lastUpdatedUserId.hashCode());
		result = prime * result + ((price == null) ? 0 : price.hashCode());
		result = prime * result + ((publishDate == null) ? 0 : publishDate.hashCode());
		result = prime * result + ((resId == null) ? 0 : resId.hashCode());
		result = prime * result + ((resName == null) ? 0 : resName.hashCode());
		result = prime * result + ((resTypeId == null) ? 0 : resTypeId.hashCode());
		result = prime * result + ((shareCount == null) ? 0 : shareCount.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result + ((thumbnail == null) ? 0 : thumbnail.hashCode());
		result = prime * result + ((useCount == null) ? 0 : useCount.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Resources other = (Resources) obj;
		if (createDate == null) {
			if (other.createDate != null)
				return false;
		} else if (!createDate.equals( other.createDate ))
			return false;
		if (createUserId == null) {
			if (other.createUserId != null)
				return false;
		} else if (!createUserId.equals( other.createUserId ))
			return false;
		if (favoriteCount == null) {
			if (other.favoriteCount != null)
				return false;
		} else if (!favoriteCount.equals( other.favoriteCount ))
			return false;
		if (keyword == null) {
			if (other.keyword != null)
				return false;
		} else if (!keyword.equals( other.keyword ))
			return false;
		if (lastUpdatedDate == null) {
			if (other.lastUpdatedDate != null)
				return false;
		} else if (!lastUpdatedDate.equals( other.lastUpdatedDate ))
			return false;
		if (lastUpdatedUserId == null) {
			if (other.lastUpdatedUserId != null)
				return false;
		} else if (!lastUpdatedUserId.equals( other.lastUpdatedUserId ))
			return false;
		if (price == null) {
			if (other.price != null)
				return false;
		} else if (!price.equals( other.price ))
			return false;
		if (publishDate == null) {
			if (other.publishDate != null)
				return false;
		} else if (!publishDate.equals( other.publishDate ))
			return false;
		if (resId == null) {
			if (other.resId != null)
				return false;
		} else if (!resId.equals( other.resId ))
			return false;
		if (resName == null) {
			if (other.resName != null)
				return false;
		} else if (!resName.equals( other.resName ))
			return false;
		if (resTypeId == null) {
			if (other.resTypeId != null)
				return false;
		} else if (!resTypeId.equals( other.resTypeId ))
			return false;
		if (shareCount == null) {
			if (other.shareCount != null)
				return false;
		} else if (!shareCount.equals( other.shareCount ))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals( other.status ))
			return false;
		if (thumbnail == null) {
			if (other.thumbnail != null)
				return false;
		} else if (!thumbnail.equals( other.thumbnail ))
			return false;
		if (useCount == null) {
			if (other.useCount != null)
				return false;
		} else if (!useCount.equals( other.useCount ))
			return false;
		return true;
	}

	public Resources() {
		super();
	}

	public Resources(String resId, String resName, String resTypeId, String publishDate, String thumbnail, String price, Integer favoriteCount,
			Integer shareCount, Integer useCount, Integer status, String createUserId, Date createDate, String lastUpdatedUserId,
			Date lastUpdatedDate, String keyword) {
		super();
		this.resId = resId;
		this.resName = resName;
		this.resTypeId = resTypeId;
		this.publishDate = publishDate;
		this.thumbnail = thumbnail;
		this.price = price;
		this.favoriteCount = favoriteCount;
		this.shareCount = shareCount;
		this.useCount = useCount;
		this.status = status;
		this.createUserId = createUserId;
		this.createDate = createDate;
		this.lastUpdatedUserId = lastUpdatedUserId;
		this.lastUpdatedDate = lastUpdatedDate;
		this.keyword = keyword;
	}

	@Override
	public String toString() {
		return "Resources [resId=" + resId + ", resName=" + resName + ", resTypeId=" + resTypeId + ", publishDate=" + publishDate + ", thumbnail="
				+ thumbnail + ", price=" + price + ", favoriteCount=" + favoriteCount + ", shareCount=" + shareCount + ", useCount=" + useCount
				+ ", status=" + status + ", createUserId=" + createUserId + ", createDate=" + createDate + ", lastUpdatedUserId=" + lastUpdatedUserId
				+ ", lastUpdatedDate=" + lastUpdatedDate + ", keyword=" + keyword + "]";
	}
}